import { ApiProperty } from "@nestjs/swagger";
import { modelOptions, prop, Ref } from "@typegoose/typegoose";
import { User } from "./User.model";
import { Wallpaper } from "./wallpaper.model";


@modelOptions({
    schemaOptions:{
        timestamps: true
    }
})

export class Say{

    @prop({ref: 'User'})
    user: Ref<User>

    @prop({})
    @ApiProperty({ description: '留言' })
    leave: string

    @prop({})
    @ApiProperty({ description: '类型' })
    type: boolean
    
    @prop({})
    @ApiProperty({ description: '标题' })
    title: string
    
    @prop({})
    @ApiProperty({ description: '副标题' })
    subTitle: string
    
    @prop({ref: Wallpaper})
    @ApiProperty({ description: '壁纸' })
    wallpaper: Ref<Wallpaper>

    @prop({})
    @ApiProperty({ description: '文章' })
    article: string

}